import { Application } from 'egg';

export default (app: Application) => {
  const { router, controller } = app;
  const managerRouter = router.namespace('/manager');
  const ipAuthMiddleware = app.middleware.ipAuth(app.config.ipAuth);

  // 刷新配置
  managerRouter.get('/config/refresh', ipAuthMiddleware, controller.appConfig.refresh);
};
